#include <stdio.h>
#include <assert.h>

#include "parser.h"

void parse_network(network net){
    unsigned int orig = 0, dest = 0, cap = 0, parsed = 0;

    assert(net != NULL);

    while(true){
        parsed = scanf("%u%u%u", &orig, &dest, &cap);

        if(parsed == 3){
            network_addEdge(net, orig, dest, cap);
        }else{ /* scanf() no encontró una arista */
            return;
        }
    }
}

